Automatic focusing camera with improved determination of operation modes

ABSTRACT

An automatic focusing camera according to the present invention is an automatic focusing camera having a plurality of operation modes, including an information input device for entering a plurality of types of photographing information, an information analyzer for analyzing the photographing information entered by the information input device based on a fuzzy inference, and a mode determining device for determining one of the operation modes based on the result of the analysis of the information analyzer.

This application is a division of application Ser. No. 07/615,271, filedNov. 19,1990, now U.S. Pat. No. 5,218,394.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to cameras and particularly toan automatic focusing camera having a function of detractingcamera-shake and operating in a plurality of operation modes.

2. Description of the Related

Recently, there have been proposed automatic focusing cameras havingvarious operation modes. Such cameras are controlled by an operationmode most suitable for conditions of an object.

Japanese Patent Laying-Open No. 61-286809 discloses a focusing apparatuswhich detects a shake amount of an object image and a focal length of ataking lens, compares the shake amount with an image shake permissiblevalue based on the focal length, and controls the therefor drive of afocusing drive lens based on the result of the comparison. This focusingapparatus makes it easy to set an in-focus state by excluding unreliablefocus information due to camera-shake and to maintain the in-focus stateafter the focusing.

In such a conventional camera having the above-mentioned focusingapparatus, even if camera-shake is detected, operation modes are notchanged based on the result of the detection. Consequently, the camerais liable to be controlled based on a rather incorrect operation modedependent on camera-shake.

If an operation mode is to be suitably set by using information oncamera-shake, degrees of camera-shake are different dependent onphotographers and consequently an appropriate operation mode cannot beset.

An automatic focusing camera using a measured focus detection valueindicating a distance to an object as information for switching ofoperation modes has been proposed.

Such an automatic focusing apparatus intends to easily set an in-focusstate by excluding unreliable focus information affected by camera-shakeand to maintain the in-focus state.

In such a conventional camera, an operation mode is determined only bythe measured focus detection value and if a change in object brightnessoccurs together with a change in the distance to the object due topanning, it is not possible to determine an appropriate operation modeby suitably detecting such conditions.

Therefore, there have been also proposed cameras having a function ofautomatically switching operation modes based on various information.

In such a conventional camera having the function of automatic switchingof modes, the switching of modes is controlled by crisp determination(binary determination) of various photographing information (such asdefocus information, a photographing magnification, and brightness of anobject) obtained in a time-sequential manner. Such crisp determinationhas, however, a limitation in an amount of information to be handled fordetermination of conditions of the object and it is difficult to reflectsufficient information on switching of operation modes. In addition, ifvarious types of information are combined in order to enhance theprecision of switching control, the control becomes complicated and asmall change in the information would affect switching of operationmodes, making the control unstable.

In addition, in such a conventional camera having the function ofautomatic switching of operation modes, if a special brightness changeas in the case of framing (setting a composition after automaticfocusing) occurs, an appropriate operation mode cannot be selected anderroneous operation sometimes occurs.

SUMMARY OF THE INVENTION

An object of the present invention is to improve reliability in anautomatic focusing camera.

Another object of the present invention is to determine an appropriateoperation mode in an automatic focusing camera.

Still another object of the present invention is to easily determine anappropriate operation mode based on plural types of photographinginformation in an automatic focusing camera.

In order to accomplish the above-described objects, an automaticfocusing camera according to an aspect of the present invention includesan automatic focusing camera having a plurality of operation modes,including: a detector for detecting a degree of camera-shake; acomparator for comparing an output of the detector with a prescribedreference value; and a mode determining device for determining one ofthe operation modes based on the result of the comparison of thecomparator.

The automatic focusing camera structured as described above enablesappropriate mode determination since one of the operation modes isdetermined based on the degree of camera-shake.

In order to accomplish the above-described objects, an automaticfocusing camera according to another aspect of the invention includes anautomatic focusing camera having a plurality of operation modes,including: an information input device for entering a plurality of typesof photographing information; an information analyzer for analyzing thephotographing information entered by the information input device basedon a fuzzy inference; and a mode determining device for determining oneof the operation modes based on the result of analysis of theinformation analyzer.

The automatic focusing camera structured as described above analyzes theplurality of types of photographing information based on the fuzzyinference to determine one of the operation modes and thus anappropriate operation mode can be determined easily.

The foregoing and other objects, features, aspects and advantages of thepresent invention will become more apparent from the following detaileddescription of the present invention when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an electric circuit of a cameraaccording to an embodiment of the present invention.

FIG. 2 is a view showing areas of brightness measurement of thephotodiodes PD0 to PD5.

FIG. 3 is a view of a visual field in a finder according to theembodiment of the invention.

FIG. 4 is a flow chart showing an operation sequence of a cameraaccording to the embodiment of the invention.

FIGS. 5A and 5B are schematic flow charts of an AF subroutine in step#425 in FIG. 4.

FIG. 6 is a sequence diagram of moving object determination according tothe embodiment of the invention.

FIGS. 7A and 7B are flow charts of moving object detection correspondingto steps #524 to #532 in FIG. 5.

FIG. 8 is a schematic diagram of an inference block according to theembodiment of the invention.

FIGS. 9A-9F show membership functions representing collating degreeswith respect to condition parts of respective inferences used forapproximate collation.

FIGS. 10A and 10B are flow charts of specific procedures of thereliability inference block in FIG. 9.

FIG. 11 is a diagram showing a relationship between a brightness changeand a main object speed on a film surface serving as a basis for themoving object detection inference block in FIG. 8.

FIGS. 12A-12F represent diagrams showing inference processes in theinference block according to the embodiment of the invention,

FIGS. 13A and 13B are flow charts showing specific procedures of themoving object detection inference block in FIG. 8.

FIGS. 14A and 14B are flow charts showing specific procedures of thecontrol amount inference block in FIG. 8.

FIG. 15 shows conditions of brightness changes in central and peripheralregions according to the embodiment of the invention.

FIG. 16 is a structural diagram of parallel processing of the movingobject detection inference block in FIG. 8, according to anotherembodiment of the invention.

FIGS. 17A-17D represent diagrams showing procedures for specificallydetermining operation modes based on respective inference blocksaccording to the first embodiment of the invention.

FIG. 18 is a flow chart of automatic switching of AF modes according tothe second embodiment of the invention.

FIG. 19 is a diagram showing a relationship between brightness changesand AF modes according to the second embodiment.

FIG. 20 shows composition in a finder related with FIG. 19.

FIG. 21 is a flow chart showing procedures of determining the AFoperation modes according to the second embodiment of the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 is a block diagram showing an electric circuit of a camera systemaccording to an embodiment of the present invention.

Referring to FIG. 1, a microcomputer MCB is incorporated in a camerabody to control the entire system. The microcomputer MCB is connectedwith a brightness measuring interface LIF, a display circuit DSP and alens circuit LEC by means of a serial data bus SDB. The microcomputerMCB is also connected with an automatic focusing (AF) interface AIFthrough another data bus ADB, and is connected with a drive circuit DDRand a camera-shake detecting circuit DVP through other data buses DDBand DVDB, respectively. In addition, an auxiliary light circuit ASL forfocus detection is connected to the microcomputer MOB through a terminalAL. The auxiliary light circuit ASL turns on an auxiliary LED (ALED) inresponse to a signal AL from the microcomputer MCB. A card interface CDis also connected to the microcomputer MCB through a serial data busSIO2. The card interface CD receives information from a card containinginformation of an AF operation mode or the like, and communicates withthe microcomputer MCB.

The brightness measuring interface LIF is connected with a brightnessmeasuring circuit LMA, and six photodiodes PD0 to PD5 are connected tothe brightness measuring circuit LMA. The photodiodes PD0 to PD5 arelocated to receive light incident on different areas of a photographingplane.

FIG. 2 is a diagram showing ranges of brightness measurement of thephotodiodes PD0 to PD5.

Referring to FIG. 2, the photodiode PD0 is disposed to receive lightincident on a circular area 1 at the center of the photographing planeFLM. The photodiode PD1 is disposed to receive light incident on aC-shaped area 2 on the left of the circular area 1. Similarly, thephotodiode PD2 is disposed to receive light incident on a reverseC-shaped area 3 on the right of the circular area 1; the photodiode PD3is disposed to receive light incident on a C-shaped area 4 located overthe circular area 1 in the figure; and the photodiode PD4 is located toreceive light incident on a C-shaped area 5 located under the circulararea 1 in the figure. The photodiode PD5 is disposed to receive lightincident on the remaining area 6 of the rectangular brightnessmeasurement range LMR, excluding the above-mentioned areas.

As can be seen from FIG. 1, the anodes of all photodiodes PD0 to PD5 aregrounded in common.

The brightness measuring interface LIF includes an AD converter whichconverts an analogue output from the brightness measuring circuit LMA todigital data to be supplied to the microcomputer MCB.

The display circuit DSP displays various photographing information (suchas an aperture value, a shutter speed, or an exposure control mode),reads the ISO sensitivity of a film from the patrone by means of acontact CAS and transmits it to the microcomputer MCB. The displaycircuit DSP has its own control microcomputer, and a reference clockgenerating circuit X1 is connected thereto.

The lens circuit LEC is provided in each taking lens and it suppliesinformation of the taking lens concerned (such as a focal length, a fullopen aperture value etc.).

A control signal is supplied to the AF interface AIF from themicrocomputer MCB through the data bus ADB. The AF interface AIFcontrols, in response to the control signal, the operation of the focusdetection light receiving circuit AFD including CCD line sensors througha signal line AFS. In addition, the AF interface AIF receives analoguedata of each pixel of the CCD line sensors through the line AFS andconverts the data to digital data, which is supplied to themicrocomputer MCB through the data bus ADB. The focus detection lightreceiving circuit AFD has three CCD line sensors P0, P1 and P2, whichare used to detect an in-focus state of an object located in the rangesshown by the broken lines in FIG. 2. More specifically, the CCD linesensor P0 is used to detect an in-focus state of the object in thehorizontal direction located at the center of the photographing planeFLM (in the 0th zone). The CCD line sensor P1 is used to detect anin-focus state of the object in the vertical direction located a littlerightward (in the first zone) from the center. The CCD line sensor P2 isused to detect an in-focus state of the object in the vertical directionlocated a little leftward (in the second zone) from the center. Whenaccumulation by CCDs in the three CCD line sensors P0, P1 and P2 iscompleted, the AF interface AIF provides an accumulation completionsignal of AFFN of low (L) level and supplies an interruption signal tothe microcomputer MCB through a terminal INT1.

The camera-shake detecting circuit DVP receives a control signal throughthe data bus DVDB from the microcomputer MCB at timing of turn-on of amain switch, whereby it starts operation. As already stated in JapanesePatent Laying-Open No. 61-286809 etc., the camera-shake detectingcircuit DVP controls the operation of a camera-shake detecting block DVSformed by combination of a plurality of acceleration detecting devicesor angular velocity detecting devices in response to the control signal,.whereby the output therefrom is obtained. The output of thecamera-shake detecting block DVS is converted to digital data by thecamera-shake detecting circuit DVP, and information on the direction andfrequency of the shake as well as the degree thereof is supplied to themicrocomputer MCB through the data bus DVDB. The microcomputer MCB usessuch information on the shake as a factor for operation determination inAF operation to be described afterwards, and drives a camera-shakecorrection motor incorporated in a lens, not shown, to correct thecamera-shake with respect to the camera-shake information in releaseoperation.

Next, description will be made of switches.

A brightness measuring switch S1 is turned on when an release button,not shown, is depressed at the first stroke. As a result of the turn-onof the switch S1, the microcomputer MCB starts measurement of brightnessand detection of an in-focus state.

A release switch S2 is turned on when the release button is depressed atthe second stroke longer than the first stroke. Thus, if the releaseswitch S2 is on, the brightness measuring switch S1 is always on. By theturn-on of the switch S2, the microcomputer MCB starts exposure controloperation.

When the main switch SM is on or off, a processing flow of "SM ON" to bedescribed afterwards is executed.

Though not shown, terminals of those switches on the non-ground side arepulled up to a power supply voltage VDD through a pull-up resistor and,needless to say, means for protection against chattering is provided.

Control data is supplied to the drive circuit DDR from the microcomputerMCB through the data bus DDB. The control data is decoded, wherebyexposure in an exposure control circuit ECC is controlled and motorcontrol data is supplied to a motor control circuit MOD.

The motor control circuit MOD controls forward and reverse rotations ofa film feed motor MOFI and a lens drive motor MOL, and controls the stopthereof.

A reference clock generating circuit XB is formed by a quartz oscillatorand a capacitor. A reference clock pulse STCK supplied through areference clock output terminal STCK of the microcomputer MCB issupplied to the brightness measuring interface LIF and the AF interfaceAIF.

FIG. 3 is a view of a visual field in a finder according to anembodiment of the invention.

Referring to FIG. 3, correspondence between the finder and focusdetection areas will be described. The first CCD line sensor P0corresponds to the focus detection area IS1 on the optical axis; thesecond CCD line sensor P01 corresponds to the right focus detection areaIS2 outside the optical axis; and the third CCD line sensor PO2corresponds to the left focus detection area IS3 of the optical axis.Thus, focus detection can be effected with respect to the object locatedin the three focus detection areas IS1, IS2 and IS3 (hereinafterreferred as the first island IS1, the second island IS2 and the thirdisland IS3 if it is necessary to distinguish among them) shown by thesolid lines in the central region of the photographing plane FLM. Arectangular frame AF shown by the dotted lines in the figure isdisplayed to notify the photographer of a photographing area where focusdetection is effected. A display portion Dfa shown outside thephotographing plane FLM indicates a focus detection condition. It isilluminated in green in the in-focus state and it is illuminated in redin a state where focus detection is unavailable. A display portion Dfbis a liquid crystal display for displaying a moving object detectionmode.

Next, an operation sequence of the camera, mainly AF operation will bedescribed with reference to the flow chart of FIG. 4.

When the main switch SM is turned on, the processing flow starts. Firstin step #400, it is determined whether the brightness measuring switchS1 is closed or not. A loop of steps #400 and #405 is executed until thebrightness measuring switch S1 is closed. In step #405, it is determinedwhether the main switch SM is opened or not. If the main switch SM isopened, the microcomputer MCB proceeds to a stop mode.

If it is determined in step #400 that the brightness measuring switch S1is closed, specific lens data of the taking lens is entered from thelens circuit LEC in step #410. The lens data includes focal length dataf, a coefficient K_(O) of conversion between a defocus amount and a lensdrive amount, a full open F value (A_(V) value) A_(V0) of the takinglens, etc.

In step #415, set data S_(V) of ISO of the film is entered through afilm sensitivity reading circuit and brightness measuring operation isperformed in step #420, so that measured brightness data B_(V) isentered through the brightness measuring interface LIF. In step #425, asubroutine AF for AF operation is called. This subroutine will bedescribed in detail afterwards. In step #430, exposure calculation isperformed, so that a shutter speed T_(V) and an aperture value A_(V) forexposure control are calculated.

Next, in step #435, it is determined whether the release switch S2 isclosed or not. If the switch S2 is closed, it is determined in step #440whether release operation is permitted or not, referring to a releasepermission flag to be described afterwards. If release operation ispermitted, the program proceeds to step #455 to perform exposurecontrol.

If it is determined in step #435 that the release switch S2 is notclosed, and if it is determined in step #440 that release operation isnot permitted, it is determined in step #445 whether the brightnessmeasuring switch S1 is opened or not. If it is opened, the programproceeds to step #400. If it is closed, the program proceeds to the nextbrightness measurement • AF routine beginning with step #410.

In step #455, exposure control is performed based on the shutter speedT_(V) and the aperture value A_(V) obtained in step #430.

FIGS. 5A and 5B are schematic flow charts of the AF subroutine called instep #425.

When this subroutine is called, accumulation by the CCDs is performed inthe focus detection light receiving circuit AFD in step #500, and instep #502, pixel data obtained is converted to digital data, which issupplied to the microcomputer MCB. In step #502, accumulation time inthe accumulation by the CCDs is input, and in step #503, brightness B ofthe object of AF is calculated from the accumulation time. Thebrightness B of the object of AF is used in a moving object reliabilityinference to be described afterwards. In step #504, a defocus amount isobtained by using the input pixel data. In step #505, a reliabilityvalue YM/C of a measured focus detection value is calculated. Thereliability value YM/C of the measured focus detection is described indetail in Japanese Patent Laying-Open No. 59-126517 and Japanese PatentLaying-Open No. 60-4914.

In step #506, determination as to the moving object mode is effected.This determination will be described afterwards. When it is determinedthat the object is a moving object, a moving object mode flag is set.Thus, in the subsequent loop, the processing flow branches to movingobject processing in step #544 et seq. if the object is a moving object,based on determination of the above-mentioned flag. Consequently, sinceit is not possible to determine whether the object is a moving object ornot in focus detection in the first loop, the processing flow alwaysproceeds to step #507.

The reliability value YM/C of the measured distance obtained in step#505 is compared with a prescribed value K. If the reliability valueYM/C is larger than the prescribed value K, the measured focus detectionvalue obtained in step #504 is unreliable and therefore the programproceeds to low contrast scanning processing in step #580. The lowcontrast scanning processing is processed for repeating measurement ofdistance while driving the lens in a forced manner to find out a lensposition making it possible to obtain a reliable measured value. Sincethe low contrast scanning processing does not have a direct relationwith the present invention, the description thereof is not given in thisspecification.

If the measured focus detection reliability value YM/C is smaller thanthe prescribed value K, this means that the measured focus detectionvalue obtained in step #504 is relatively reliable and therefore theprogram proceeds to step #508.

In step #508, it is determined whether continuous AF is selected or not.If the continuous AF is selected, the continuous AF operation isperformed based on a continuous flag set after setting of a continuousAF flag to be described later.

Then, in step #510, it is determined by using an in-focus flag to bedescribed later whether an in-focus state is set or not. Thus, after thein-focus state is set, the processing flow branches to the moving objectdetermination beginning with step #524. If the in-focus state has notbeen set, it is determined in step #512 whether the lens is being drivenor not. If the lens is being driven, step #514 is skipped becausein-focus determination in the subsequent step would not be made with agood precision. If the lens is not being driven, it is determined instep #514 whether the taking lens enters an in-focus zone. If it is inthe in-focus zone, the in-focus flag (which is used in step #510) is setin step #520 and the in-focus display (green display of the portion Dfashown in FIG. 3) is turned on in step #522 and the release permissionflag (which is used in step #440 in FIG.4) is set.

If it is determined in step #514 that the taking lens is not in thein-focus zone, lens drive for focusing is performed in step #540 and theprogram returns to the main routine, so that the next focus detectionmeasurement beginning with step #500 is started.

If it is determined in step #510 that the in-focus flag is set, theprogram proceeds to step #524 to determine whether focus detection isperformed four times. If focus detection measurement is not performedconsecutively four times, the program returns to the main routine tostart the next focus detection in step #500 et seq.

If four focus detections are terminated, four defocus amounts obtainedby the four focus detections are averaged in step #526 so that anaverage defocus amount DF_(X) is obtained. Then, in step #528, areliability inference is made based on data of previously obtained twoor more average defocus amounts, and variation in the brightness of theobject, the measured focus detection reliability value, thephotographing magnification and the moving speed of the object. If thereliability of determination in the AF operation mode is very low, theprogram proceeds to step #542 to set the AF lock flag. In the firstloop, there is not a necessary number of data and accordingly the samevalue is used.

If a fairly good reliability is inferred in step #528, it is determinedin step #530 whether four or more average defocus amounts DF_(X)mentioned above are obtained or not. This is because the next movingobject determination in step #532 is effected only when four averagedefocus amounts DF_(X) are obtained. If there are not four averagedefocus amounts DF_(X), the program also returns to the main routine tostart the next loop of focus detection beginning with step #500 et seq.

If there are four average defocus amounts DF_(X), the moving objectdetermination is effected in step #532 using the four average defocusamounts DF_(X).

If it is determined in step #532 that the object is not a moving object,the permissible magnification value β is recalculated and the obtainedvalue is written into the E² PROM (in step #533). Then, the programreturns to the main routine.

If it is determined in step #532 that the object is a moving object, themoving object mode flag (which is used in step #506) is set in step#534, and calculation for moving object correction is performed in step#536. Thus, a lens drive amount is obtained by calculating an estimatedamount of defocus due to the moving object, in addition to a normaldefocus amount.

After that, a moving object display (the display of LCD (Dfb) shown inFIG. 3) is turned on in step #538 and the lens is driven in step #540based on the calculated lens drive amount. In the following, theoperation mode of the above-mentioned moving object correction and lensdrive is referred to as the "moving object mode".

After the "moving object mode" is started, the program returns to themain routine after lens drive to enter again the loop beginning withstep #500. The program proceeds this time from step #506 to step #544 toperform calculation for moving object correction. The calculation formoving object correction in step #544 is different from the calculationfor moving object correction for lens drive in step #536. In step #536,correction is made for the purpose of correcting the value attermination of the subsequent focus detection, while in step #544,correction is made for the purpose of correcting the value attermination of the present focus detection.

In step #546, in-focus determination is made based on a value obtainedby the correction. If the in-focus state is determined, in-focus displayis made and release operation is permitted in step #548. Subsequently,in step #550, it is determined whether the moving direction of theobject is inverted during the "moving object mode" If the movingdirection is inverted, a continuous flag is set in step #552 to select a"continuous mode", and the moving object mode flag is canceled in step#554.

This is because if moving object correction is made in spite of theinversion of the moving direction of the object, correction would besometimes made reversely with respect to forward or rearward movement ofthe object. Such phenomenon occurs because of a delay in the movingobject correction due to a time lag caused by the accumulation time ofthe CCD line sensors in the case of detecting the movement of theobject. Therefore, the simple continuous AF exhibits a better trackingeffect with respect to an object moving forward and rearward at random.

FIG. 6 is a sequence diagram of moving object determination.

Referring to FIG. 6, the lens is driven in the first and second focusdetections A and B and detection of a moving object is started afterfocus detection C for determination of the in-focus state. The reasonthat moving object detection is not effected in the focus detections Aand B is that the object in most cases is not in the in-focus zone yetin the focus detection B because of a backlash of the lens drive, a lowprecision of focus detection due to a large deviation of the lens fromthe in-focus position, and an error in the coefficient K_(O) ofconversion between the defocus amount and the lens drive amount.

In the moving object detection, after the in-focus state is determinedby the focus detection C, focus detection is effected four timesconsecutively while the taking lens is stopped. As shown in FIG. 6, thefour focus detections D₁, D₂, D₃, and D₄ are effected consecutively. Thedefocus amounts obtained by those focus detections are averaged so thatan average defocus amount DF_(X) is obtained. Subsequently, four focusdetections are repeated. Thus, when the average defocus amount DF_(X) isobtained in each of the sequences of four focus detections including E₁-E₄, F₁ -F₄ and G₁ -G₄, moving object determination is effected by usingthose four average defocus amounts DF_(X). The speed of the object whichcan be detected in this moving object determination is a speed higherthan 0.25 mm/s obtained by conversion on the film surface. If it isdetermined that the object is a moving object, the operation modeswitches to the "moving object mode", in which moving object correctionand moving object display are effected.

FIGS. 7A and 7B are specific flow charts of moving object detection.

Those flow charts correspond to steps #524 to #532 in FIG. 5.

Referring to the figures, it is assumed that data stored in a memory asDF (sum) which is a sum of defocus amounts DF is cleared by closing thebrightness measuring switch S1. Then, as a result of the determinationin step #510 in FIG. 5, the flow after the in-focus determination startsas shown.

In step #800, a defocus amount (present) obtained by the present focusdetection is added to the data DF (sum) stored in the memory and thevalue obtained by the addition is stored as DF (sum). In step #805, itis determined whether consecutive four focus detections have been made.If the four focus detections have not been made, the program proceeds tostep #807, where a first determination counter m counts upward. Then theprogram returns to the main routine.

If the four focus detections have been made, a second determinationcounter l which determines the number of occurrences of the sequence offour consecutive focus detections is caused to count upward in step#810. Those two counters l and m are cleared when the brightnessmeasuring switch S1 is closed. In step #815, only the firstdetermination counter n is cleared.

In step #820, the sum DF of four defocus amounts is divided by 4 so thatan average defocus amount DF (average) is obtained. In step #825, it isdetermined by using a memory flag to be described afterwards whether thefirst value DF_(O) of such average defocus amount DF (average) after thesetting of the in-focus state (this value being referred to as the "basedefocus amount"). If the base defocus amount DF_(O) is in the memory,the program proceeds to step #840. If it is not stored in the memory,the first average defocus amount DF (average) is set as the base defocusamount DF_(O) in step #830 and the memory flag (which is the same asused in step #825) is set in step #835.

In step #840, the average defocus amount DF (average) obtained in step#820 is stored in a memory DF₄ and data in four memories DF₄, DF₃, DF₂and DF₁ are successively sifted. Thus, the latest average defocus amountDF (average) is always in the memory DF₄. In steps #845 and #850,determination is made to set AF lock. The reliability inference block inthose steps will be described afterwards with reference to FIGS. 8, 10Aand 10B. If a reliability inference value A is such a low value as 0(YES in step #850), the AF lock flag is set in step #542 and the programreturns to the main routine. In the other cases, the focal length of thetaking lens is determined in steps #864 and #866 and a moving objectdetermination level to be used in step #875 is appropriately set. If thefocal length f is determined to be smaller than 50 mm in step #864, thedetermination level Cn is set to 100 μm in step #867. If the focallength is determined to be smaller than 200 mm in step #866, thedetermination level Cn is set to 150 μm in step #868. If the focallength f is determined to be larger than 200 mm, the determination levelCn is set to 200 μm in step #869. This determination level Cn is used todetermine the difference between the two values of the average defocusamounts DF (average).

In step #870, it is determined what is the number of sequences of fourconsecutive focus detections, that is, whether or not the number ofaverage defocus amounts DF (average) obtained for each sequence of fourconsecutive focus detections is 4. If it is 4 or more, the moving objectdetermination beginning with step #875 is effected.

This moving object determination includes two large inference blocks.One is a moving object detection inference block (in step #875) and theother is a control amount inference block (in step #880). Details ofthose blocks will be described afterwards with reference to the flowcharts of FIGS. 11, 12 and 13.

In step #885, it is determined whether moving object correction is to bemade or not. If moving object correction is not to be made, thepermissible magnification value β is recalculated and the value obtainedis written in the memory E² PROM (in step #890), and the program returnsto the main routine. If moving object correction is to be made, anobject speed V₁ is calculated by using two average defocus amounts DF₃and DF₁ and the time between the two measurements in step #895.Similarly in step #897, an object speed V₂ is calculated by using twoaverage defocus amounts DF₄ and DF₂ and time between the twomeasurements. In step #899, the average of those object speeds V₁ and V₂is calculated (V=(V₁ +V₂)/2), whereby an average object speed V isobtained. Then, the program proceeds to step #534 in FIG. 5.

In the moving object correction, a defocus amount at the end of the nextfocus detection is estimated by using the average object speed V and alens drive amount taking account of the estimated defocus amount isobtained, whereby focusing operation is repeated. When an in-focus stateis set, release operation is performed. In the release operation, therelease switch S2 may be closed after the setting of the in-focus state,or the release switch S2 may be closed before the setting of thein-focus state. When the release switch S2 is closed, exposure controlis performed. The camera system has a structure where light does notenter a focus detection optical system AO during the exposure control.

The control procedure for the moving object correction or the like isthe same as that described in U.S. Ser. No. 352,190 filed by the sameassignee as that of the present application and therefore thedescription is not repeated.

Next, description will be made of determination and inference of AFoperation using a fuzzy inference constituting a main feature of theembodiment of the present invention.

FIG. 8 is a schematic diagram of an inference block.

First, reliability of the AF operation inference is estimated in areliability inference block 10 based on information from the brightnessmeasuring circuit LMA and the focus detection light receiving circuitAFD, and information such as the measured focus detection reliabilityvalue YM/C, the photographing magnification β, the object brightness B,variation in speed, a camera-shake amount etc. The reason fordetermining the magnification is that if the magnification is high, thevalues of focus detections considerably vary to cause a large error indetection. Such variation depends mainly on the camera holdingconditions of the photographer. Therefore, a determined magnificationlevel is learned and stored in the E² PROM for each photographer basedon variation of measured focus detection values during moving objectdetermination continued for a still object to be described afterwards,and magnification information at the time of the determination. Thephotographing magnification is obtained from the focal length f of thelens and the distance to the object.

If the reliability value A of the AF operation inference is very low,this means that it is not possible to infer AF operation. In that case,the lens drive is temporarily stopped at an in-focus point, whereby itis possible to avoid an abnormal deviation of focus due to unstable lensoperation or excessive correction for the moving object.

A moving object detection inference block 20 is provided based on thereliability evaluation value A, divisional brightness measurement fordetecting whether the object is a moving object or camera-shake occurs,and a change amount of information obtained by focus detection. Themoving object detection inference block 20 is a block for inferring howthe present object is suited for the respective AF operation modesincluding AF lock, determination continuation, continuous AF, and movingobject prediction continuous AF modes.

Next, a control amount inference block 30 is a block in which the mostsuitable operation mode for the camera is inferred and selected amongthe above-mentioned four operation modes based on the results of theinference of the moving object detection inference block 20.

All those inferences are not crisp (binary) inferences but fuzzyinferences using a fuzzy set for numerical evaluation. In consequence,compared with U.S. Ser. No. 352,190 filed by the same assignee as thatof the present application, it becomes easier to control a camera basedon various information in a manner fitted to the human sense.

First, referring to FIGS. 9A-F, 10A and 10B, the reliability inferenceblock will be described.

First, as to reliability of the moving object determination, thefollowing conditions are established.

1 If the object brightness is high, (the S/N ratio is improved becauseof increase in an output of the sensor and) the moving objectdetermination has a high reliability.

Thus, the condition that "if the object brightness is high, then thereliability is high" is established.

2 If focus detection has a high reliability, that is, if the measuredfocus detection reliability value YM/C is low, the moving objectdetermination has a high reliability (because calculation of the speedof the moving object serving as a basis for the moving objectdetermination can be made correctly).

Thus, the condition that "if the measured distance reliability valueYM/C is low, then the reliability is high" is established.

3 If the photographing magnification is low, the moving objectdetermination has a high reliability (because camera-shake does notaffect the measured focus detection values).

Thus, the condition that "if the magnification β is small, then thereliability is high" is established.

4 If there is little variation in the object speed represented on thefilm surface, the moving object determination has a high reliability.

Thus, the condition that "if there is little variation in the objectspeed, then the reliability is high" is established.

5 If a degree of camera-shake is small, the moving object determinationhas a high reliability (because the camera-shake does not affect themeasured focus detection values).

Thus, the condition that "if the degree of camera-shake is small, thenthe reliability is high "is established.

The above-mentioned degree of camera-shake is a degree obtained byextracting an output of a camera-shake frequency range (for example 1 Hzto 12 Hz) from the output of the camera-shake detecting circuit DVP andnormalizing, by using a prescribed permissible camera-shake amountK_(H), a value obtained by multiplying the maximum value Hmax of theamplitude of the extracted output by the focal length f of the takinglens.

Thus, camera-shake degree H=Hmax×f/K_(H)

Then, the reliability evaluation value A is obtained by approximatecollating of the above-mentioned inferences 1 to 5 (i.e., fuzzyproduction rules) with processed information from the respectivesensors.

All the inferences 1 to 5 have the following relation with thereliability evaluation value A.

"If (the brightness is high) AND (the measured distance reliability ishigh) AND (the magnification is low) AND (a stable speed of the movingobject is obtained) AND (the degree of camera-shake is small), then thereliability (A) of the moving object determination is high."

FIGS. 9A-9F shows membership functions 1 to 4, 4', 5) representingcollating degrees with respect to the condition parts (if-) of therespective inferences used for the approximate collation.

Each membership function is represented as a curve which determines thereliability A by the corresponding single factor with other factorsbeing assumed at the complete reliability level A=1.

For example, with regard to the measured distance reliability (in theinference 2), it is very high if the measured distance reliability valueYM/C is smaller than 0.1 and this factor exerts no effect on thereliability of the whole system. Conversely, if the above-mentionedmeasured distance reliability value is larger than 0.6, good reliabilityis not ensured for the whole system. Consequently, the reliability ofthe system changes in relation to those values.

Thus, the membership functions are set in the respective inferences. Asfor the magnification β, the membership function is defined to effecttuning in a manner in which predetermined broken lines of inclinationare shifted based on the value β_(E) 2_(PROM) written in the E² PROM tostart inclining downward from 1 in the range of the value β_(E)2_(PROM). Thus, the inference is made by taking account of differencesin camera-shake degrees on the side of photographers. As to thevariation in the object speed, the absolute value of the variation tendsto increase as the speed increases. Accordingly, if the average speed isless than a prescribed value SPth, the membership function forevaluating reliability by the absolute value of the variation (in theinference 4) is defined. If the average speed is equal to or larger thanthe prescribed value, the membership function for evaluating thereliability by a ratio with the average speed (in the inference 4') isdefined.

Evaluation values F_(B) (B), F_(YM/C) (YM/C), F.sub.β (β), F_(SP) (SP),and F_(H) (H) with respect to inputs for those membership functions areobtained and the minimum value is selected among those values, wherebythe reliability evaluation value A of the moving object determination isobtained.

FIGS. 10A and 10B are flow charts for calculating the reliabilityevaluation value A.

First, in step #1, an average brightness B of the object is calculatedbased on the measured brightness value obtained this time. In step #2, afunction value based on the brightness B calculated from the membershipfunction F_(B) (B) is picked up. Subsequently, in step #3, a functionvalue is calculated from the membership function F_(YM/C) (YM/C) withrespect to the measured distance reliability value YM/C is calculatedfor the focus detection value obtained by the present measurement.

Next, the magnification β_(E) 2_(PROM) written in the E² PROM is readand the membership function Fβ(β) is tuned based on the value (in step#5). Then, the membership function value F.sub.β (β) with respect to thephotographing magnification β obtained based on the measured focusdetection value is calculated (in step #6).

In step #7, the object speed is calculated based on the focus amountsdF_(O) to dF₄. In step #8, it is determined whether the average speed A_(V) (SP) is larger than the prescribed value SPth. If the average speedis larger than the prescribed value, the measured speed reliabilitymembership function value F_(SP) is obtained by using a measured speedratio R (in step #9). If the average speed is smaller than theprescribed value, the measured speed reliability membership functionvalue F_(SP) is obtained by using a deviation in the measured speed instep #10.

Subsequently, in step #11, the membership function value F_(H) (H) withrespect to the camera-shake degree H is obtained. Then, in step #12, thereliability value is calculated based on the respective membershipfunction values obtained in the above-mentioned steps. Thus, thefollowing value is calculated.

    A=min(F.sub.B, F.sub.Y M/C, F.sub.β, F.sub.SP, F.sub.H)

The reliability evaluation value A thus obtained is 0≦A≦1. In the caseof A=0, the moving object determination is apparently unavailable and AFlock is effected (in step #542 in FIG. 5). Thus, only in the case ofA≠0, the program proceeds to the moving object detection inferenceblock.

FIG. 11 is a diagram showing a pattern of division into the movingobject detection inference block and the control amount inference block.

In those inferences, the optimum AF operation mode for the object isdetermined from the object speed detected by changes in brightness ofthe central region of brightness measurement including the focusdetection areas and changes in background brightness of the surroundingareas.

Those fuzzy production rules 1 to 6 will be described by taking anexample of a simple actual state of use.

1. If the speed of the main object is zero, the object is still pickedup in the focus detection areas and this speed is very slow or theobject is actually at a stop. Thus, in those cases, it is desirable tocontinue the moving object determination (JC).

2. If the speed of the main object is negative (that is, the main objectbecomes distant from the camera) and the brightness changes in thecentral or peripheral region, there is a strong possibility that framingis changed (that is, AF lock is set) of the photographer's own willafter end of AF operation in the central focus detection area.Therefore, in that case, it is desirable to set focus lock (FL), notfollowing subsequent measured focus detection values.

3. If the speed of the object is not zero and the brightness in thecentral and peripheral regions changes considerably, there is a strongpossibility that the photographer intentionally moves the camera tochange framing. Thus, in that case, it is desirable to set focus lock(FL).

4. If the speed of the main object is positive and change in brightnessin either the central region or the background is small, there is astrong possibility that the main object is a moving object in eithercase. More specifically stated, if the change in brightness in thecentral region is small, the photographer can be considered to move thecamera in order to continuously pick up the main object at the center.Conversely, if the change in brightness in the background region issmall, there is little camera-shake by the photographer and the effectexerted by the brightness measuring sensors on the main subject differsdependent on movement of the main object in the central area ofbrightness measurement including the focus detection areas. Thus, in astrong probability, the main object is a moving object. Therefore, ineither case, it is desirable to set moving object prediction continuousAF (PC).

5. It is possible to assume a case in which the camera is not shaken andthe main object becomes distant at a considerably fast speed if changein brightness in either the central region or the background is smalland the speed of the main object is a large negative value. In thatcase, it is desirable to set the moving object prediction continuous AF(PC).

6. If change in brightness in either the central region or thebackground is small and the speed of the main object is a negative smallvalue, a case can be similarly assumed in which the camera is not shakenand the main object becomes distant. If the main object approaches, thespeed c,n the film surface increases rapidly. Conversely, if it becomesdistant, it is normally difficult to assume a photographing situation inwhich the speed on the film surface decreases. Therefore, it isdifficult to predict subsequent operation of the object and it isdesirable to set the previously stated continuous AF(C) and to enablethe camera to be ready for complicated operation.

Based on the above-described six fuzzy production rules, the AFoperation mode is determined.

FIGS. 12A-F represent diagrams showing inference processes in theabove-described cases.

Before explanation of the inference processes, description will be madeof calculation of changes in brightness in the central and peripheralregions with reference to FIG. 15.

Let us assume that measured values of the brightness measuring devicesPD₁ to PD₆ by brightness measurement at multiple points are calculatedas shown. Referring to FIG. 15, the marks o represent previouslymeasured brightness values and the marks □ represent presently measuredbrightness values. The change values in the central and peripheralregions are change amounts normalized by measured brightnessdistribution widths.

First, the maximum and minimum values are extracted among 12 pieces ofmeasured brightness information obtained by the above-mentioned twobrightness measurements. Then, a difference between the previouslymeasured brightness value and the presently measured brightness value ineach brightness measuring device PD is obtained and the valuesnormalized by the maximum and minimum differences are obtained as changeamounts ΔBn (n=1 to 6) in the respective brightness measuring devices.Among the values of the central brightness measuring area, n=1 to 3, themaximum change amount is regarded as the central brightness change, andthe maximum change amount among the values in the peripheral brightnessmeasuring region, n=4 to 6 is regarded as the peripheral brightnesschange.

However, if the brightness distribution width is very small, there is aconsiderable brightness change due to noise. Consequently, if thebrightness distribution width is smaller than a prescribed value, thestate is set to a central brightness change 1 and a peripheralbrightness change 0 which serve as determination information based onthe measured focus detection values.

Next, referring to FIGS. 12A-12F, the moving object detection inferenceblock and the control amount inference block will be described.

First, in the inference 1 shown in FIG. 12A, it is inferred whether thedetected speed of the object is approximate to zero or not.Subsequently, the membership functions of the speed are all determinedbased on a deviation Cn given by the focal length f. A function value ofthe membership function Fsz (SP) of 1 of FIG. 12A with respect to theobtained average speed is calculated. A value obtained by multiplicationby the reliability evaluation value A is used as the approximatecollating value of this inference 1, that is, Fsz (SP)×A.

Next, in the inference 2 shown in FIG. 12B, it is inferred whether theobject speed is applied in the minus direction or not. A function valueof the membership function F_(SM) (SP) of 2 of FIG. 12B with respect tothe obtained average speed is calculated. As to the brightness change,the function value F_(BL) (BB₁) corresponding to the backgroundbrightness change amount BB₁, and the function value F_(CL) (CB₁)corresponding to the central brightness change amount CB₁ are calculatedby using the membership function indicating whether there is asignificant brightness change in the background and central regions.

Since the inference 2 is based on the condition that "if the main objectspeed is ○- and a large brightness change occurs in the eitherbackground or the central region, then focus lock is set", a valueobtained by multiplying the value of Min {F_(SM) (SP₁), Max{F_(BL)(BB₁), F_(CL) (CB₁)}} by a complement (1-A) of 1 (non-reliabilityevaluation value) for the reliability evaluation value A is regarded asthe approximate collating value of this inference 2. Thus, theapproximate collating value is as follows.

    Min{F.sub.SM (SP.sub.1), Max{F.sub.BL (BB.sub.1), F.sub.CL (CB.sub.1)}}×(1-A)

Next, in the inference 3 shown in FIG. 12C, it is inferred whether themain object speed is "NOT Zero".

A function value of the membership function F_(SNZ) (SP) of 3 of FIG.12C with respect to the obtained average speed is calculated and, in thesame manner as in the inference 2, F_(BL) (BB₁) and F_(CL) (CB₁) arecalculated by using the membership function indicating whether a largebrightness change occurs in the background and central regions. Sincethe inference 3 is based on the condition that "if the main object speedis not zero and a large brightness change occurs in both the backgroundand central regions, then focus lock is set", a value obtained bymultiplying Min{Fsnz(SP₁), F_(BL) (BB₁), F_(CL) (CB₁)} by a complementof (1-A) of 1 of the reliability evaluation value A is used as theapproximate collating value of the inference 3.

Thus, the approximate collating value is as follows.

    Min{F.sub.SNZ (SP.sub.1), F.sub.BL (BB.sub.1), F.sub.CL (CB.sub.1)}×(1-A)

Next, in the inference 4 shown in FIG. 12D, it is inferred whether themain object speed is a plus value or not.

A function value of the membership function F_(SP) (SP) of 4 of FIG. 12Dwith respect to the obtained average speed is calculated and a functionvalue F_(BS) (BB₁) corresponding to the background brightness changeamount BB₁, and a function value F_(CS) (CB₁) corresponding to thecentral brightness change amount CB₁ are calculated by using themembership function indicating whether a small brightness change occursin the background and central regions.

Since the inference 4 is based on the condition that "if the main objectspeed is + and the brightness change is small in either the backgroundor the central region, then the moving object prediction continuous Afis set", a value obtained by multiplying Min{F_(SP) (SP₁), Max {F_(BS)(BB₁), F_(CS) (CB₁)}} by the reliability evaluation value A is used asthe approximate collating value of the inference 4. Thus, the inferencecollating value is as follows.

    Min{F.sub.SP (SP.sub.1), Max{F.sub.BS (BB.sub.1), F.sub.CS (CB.sub.1)}×A

In the inference 5 shown in FIG. 12E, it is inferred whether the mainobject speed is a large minus value or not.

A function value of the membership function F_(SML) (SP) of 5 in FIG.12E with respect to the obtained average speed is calculated and thefunction value F_(BS) (BB₁) corresponding to the background brightnesschange BB₁, and the function value F_(CS) (CB₁) corresponding to thecentral brightness change amount CB₁ are calculated by using themembership functions indicating whether the brightness change in thebackground and central regions is small or not.

Since the inference 5 is based on the condition that "if the main objectspeed is a large minus value and the brightness change in both thebackground and central regions is small, then the moving objectprediction continuous AF is set", a value obtained by multiplying Min{F_(SML) (SP₁), F_(BS) (BB₁), F_(CS) (CB₁)} by the reliabilityevaluation value A is used as the approximate collating value of theinference 5.

Thus, the approximate collating value is as follows.

    Min{F.sub.SML (SP.sub.1), F.sub.BS (BB.sub.1), F.sub.CS (CB.sub.1)}×A

Next, in the inference 6 shown in FIG. 12F, it is inferred whether themain object speed is a minus small value or not.

A function value of the membership function F_(SML) (SP) of 6 of FIG.12F with respect to the obtained average speed is calculated and thefunction value F_(BS) (BB₁) corresponding to the background brightnesschange BB1, and the function value F_(CS) (CB₁) corresponding to thecentral brightness change amount CB₁ are calculated by using themembership functions indicating whether the brightness change in thebackground and central regions is small or not.

Since the inference 6 is based on the condition that "if the main objectspeed is a minus small value and the brightness change in both thebackground and central regions is small, then continuous AF is set", avalue obtained by multiplying Min {F_(SMS) (SP₁), F_(BS) (BB₁), F_(CS)(CB₁)} by the reliability evaluation value A is used as the approximatecollating value of the inference 6.

Thus, the approximate collating value is as follows.

    Min{F.sub.SMS (SP.sub.1), F.sub.BS (BB.sub.1), F.sub.CS (CB.sub.1)}×A

FIGS. 13A and 13B are flow charts showing the above-described movingobject detection inference block.

Referring to those figures, first, in step #101, the speed membershipfunctions F_(SZ), F_(SM), S_(SNZ), F_(SP), F_(SML), and F_(SMS) areobtained based on the defocus determination level Cn defined withrespect to the focal length f of the lens.

Next, in step #102, the inference 1 is made. In this case, themembership function value Fsz is obtained from the average speed andthis value F_(SZ) is multiplied by the reliability evaluation value A instep #103 to obtain the approximate collating value F1 of the inference1.

In step #104, the brightness change amount is calculated. In this case,B₁ (t) to B₆ (t) are outputs of the six brightness measuring devicesprovided by the present measurement, and B₁ (t-1) to B₆ (t-1) areoutputs of the six brightness measuring devices obtained by the previousmeasurement.

ΔB_(N) represents a difference between the previous and presentbrightnesses in the six brightness measuring devices, and ΔB iscalculated based on the brightness difference between the maximum andminimum values on the brightness information at 12 points of B₁ (t) toB₆ (t) (hereinafter referred to as B_(N) (t)) and B₁ (t-1) to B₆ (t-1)(hereinafter referred to as B_(N) (t-1)). Thus, ΔB_(N) is normalized byΔB.

In step #105, comparison between ΔB and the prescribed value ΔBth ismade. If the brightness distribution width is very small, the value ofΔB_(N) considerably changes due to noise and in that case determinationinformation based on the maximum measured focus detection value is used.The central brightness change is set to CB=1 and the peripheralbrightness change is set to BB=0 (in step #106). If there is somebrightness difference in the brightness distribution, the centralbrightness change amount is obtained as ##EQU1## and the peripheralbrightness change amount is obtained as ##EQU2## in step #107. In step#108, the inference 2 is made by using the calculated brightness changevalues CB and BB and the average speed. The membership function valueF_(SM) is obtained from the average speed, and the membership functionvalues F_(BL) and F_(CL) are obtained from the brightness change valuesCB and BB. In step #109, the approximate collating value F2 of theinference 2 is obtained.

In step #110, the inference 3 is made. The membership function valueF_(SNZ) is obtained from the average speed and the approximate collatingvalue F3 of the inference 3 is obtained in step #111 by using the valuesF_(BL), F_(CL) obtained in step #108.

In step #112, the inference 4 is made. The membership function valueF_(SP) is obtained from the average speed, and the membership functionvalues F_(CS) and F_(BS) are obtained from the brightness change valuesCB and BB, whereby the approximate collating value F4 of the inference 4is obtained in step #113.

In step #114, the inference 5 is made. The membership function valueF_(SML) is obtained from the average speed and the approximate collatingvalue F4 of the inference 5 is obtained in step 115 by using the valuesF_(CS) and F_(BS) obtained in step #112.

In step #116, the inference 6 is made. The membership function valueF_(SMS) is obtained from the average speed and the approximate collatingvalue F6 of the inference 6 is obtained in step #117 by using the valuesF_(CS) and F_(BS) obtained in step #112.

Thus, the respective approximate collating values F1 to F6 correspondingto the inferences 1 to 6 are obtained. Those inferences may be effectedin parallel.

FIG. 16 is a structural diagram of parallel processing of the inferences1 to 6 shown in FIG. 13.

Since the inferences 1 to 6 can be independently effected, it ispossible to effect those inferences in parallel. The reliabilityevaluation value A of the reliability inference block 10, the averagespeed and the brightness change amounts CB, BB associated with therespective inferences are set as input data on the data bus and aninference start signal is applied, whereby each of inference portions22a to 22f makes the prescribed inference. The results of the inferencesare supplied as the approximate collating values Fn of the inferences tothe control amount inference block 30 and, at the same time, a signalENDFn indicating the termination of the inferences is supplied from eachinference block to an AND circuit 24. The AND circuit 24 applies a startsignal to the control amount inference block 30 on termination of allthe inferences and after that the control amount inference block 30operates. Thus, it is possible to reduce the calculation time by theparallel processing of the inferences.

FIGS. 14A and 14B are flow charts showing a processing flow of thecontrol amount inference block.

First, in step #201, the approximate collating values F1 to F6 of therespective inferences calculated in the moving object detectioninference block are set in correspondence with the AF operation mode.

In this step, F_(JC) is an evaluation value showing continuation of themoving object determination; F_(FL) is an evaluation value showing focuslock; F_(PC) is an evaluation value showing moving object predictioncontinuous AF; and F_(C) is an evaluation value showing continuous AF.They are calculated by the following equations.

    F.sub.JC =F1

    F.sub.FL =Max{F2, F3}

    F.sub.PC =Max{F4, F5}

    F.sub.C =F6

Next, in step #202, the AF operation mode C_(A/C) is determined based onthe evaluation values F_(JC), F_(FL), F_(PC) and F_(C) obtained in step#201. The determination method includes a method A and a method B andeither method may be used.

In the method A, a mode having the largest evaluation value among theevaluation values F_(JC), F_(FL), F_(PC) and F_(C) is selected. Thus,the mode C_(A/C) is represented as follows:

    C.sub.A/C =Max{F.sub.JC, F.sub.FL, F.sub.PC, F.sub.C }

In the method B, the mode C_(A/C) is determined dependent on in whichcontrol area the center-of-mass point of each of the evaluation valuesF_(FL), F_(JC), F_(C) and F_(PC) is included. Those methods A and B willbe described afterwards with reference to FIG. 17.

Next, in step #203, it is determined whether moving object predictioncontinuous AF is selected as the AF operation mode. If the moving objectprediction continuous AF is selected, the program returns immediately.

If the moving object prediction continuous AF is not selected, it isdetermined in step #205 whether focus lock is selected or not. If thefocus lock is selected, the AF lock flag is set in step #206 and theprogram returns. If the focus lock is not selected, it is determined instep #208 whether continuous AF is selected or not. If the continuous AFis selected, the continuous flag is set in step #209, and the programreturns. If continuous AF is not selected, the program proceeds to aroutine of "recalculation of the permissible β value and storage thereofinto E² PROM" in step #210. In this routine, first in step #211, thephotographing magnification β_(E) 2_(PROM) stored in the E² PROM isread. In step #212, the present photographing magnification β iscompared with the prescribed value βth. This is because if thephotographing magnification β is a large value, a special case such asmicro-photographing is assumed and a considerable adverse effect wouldbe exerted by rewriting the stored magnification β_(E) 2_(PROM). Morespecifically, if the stored magnification is rewritten, the value β_(E)2_(PROM) would increase and the moving object mode would be liable to beselected. Therefore, if the photographing magnification β is larger thanthe prescribed value βth, the program immediately returns. If themagnification β is less than the prescribed value βth, a varying rangeσ_(Df) of the present Df amount is obtained from Df₁ to Df₄ in step#213. This value σ_(Df) showing the varying range is used as a weighingcoefficient of the present magnification β.

In step #214, the stored magnification value β_(E) 2_(PROM) newly isset. As to the presently detected value β, a reciprocal of a valueσ_(dF) /σ_(dFth) obtained by normalizing σ_(dF) by a prescribed valueσ_(dFth) is used as a weight, and a weighted mean is obtained byweighing the previously stored magnification value β_(E) 2_(PROM) by theprescribed value B, whereby the magnification value β_(E) 2_(PROM) to bestored is newly set.

In step #215, the newly set value β_(E) 2_(PROM) is compared with themaximum permissible value (β_(E) 2_(PROM)) max of β_(E) 2_(PROM). If thevalue β_(E) 2_(PROM) is larger than the maximum permissible value, thevalue β_(E) 2_(PROM) is replaced by (β_(E) 2_(PROM)) max in step #216,whereby the program returns in step #207.

If it is determined in step #215 that the value β_(E) 2_(PROM) issmaller than the permissible maximum value, it is compared with thepermissible minimum value (β_(E) 2_(PROM)) min in step #217. If thevalue β_(E) 2_(PROM) is smaller than the permissible minimum value, thevalue β_(E) 2_(PROM) is replaced by (β_(E) 2_(PROM)) min in step #218and the program returns. If the value β_(E) 2_(PROM) is larger than thepermissible minimum value, the program immediately returns.

On the other hand, if the value β_(E) 2_(PROM) is larger than thepermissible maximum value, the value β_(E) 2_(PROM) is replaced by thevalue (β_(E) 2_(PROM)) max in step #216 and the program returns.

FIGS. 17A-17D represents diagrams showing procedures for specificallydetermining the AF control mode.

In this case, for example, with the conditions of the object speed ofSP1, the central brightness change amount of CB₁, the backgroundbrightness change amount of BB1 and the reliability determination valueof A=1, the respective evaluation inference values are obtained as shownin 1 of FIG. 17A.

More specifically, a JC mode in which determination continues isselected as the AF control mode by MP₁ according to a Max method as themethod A in FIG. 14, or WP₁ according to a weighing method as the methodB.

If the reliability determination value in the above-mentioned conditionsis changed to A=0, an FL mode, that is, the focus lock mode is selectedas shown in 2 FIG. 17B. Similarly, if the object speed in theabove-mentioned conditions is changed to SP2 and the reliabilitydetermination value is A=1, a PC mode, that is, the moving objectprediction continuous AF mode is selected as shown in 3 FIG. 17C. If theobject speed is SP3 and the reliability determination value is A=1, thefocus lock mode is selected as shown in 4 FIG. 17D.

In the above-described embodiment, automatic switching of the AF mode isaccomplished by the fuzzy inference using multiple-point measuredbrightness values, measured focus detection values and the like.However, even in a conventional control method by binary determinationnot using the fuzzy inference, automatic switching of the AF mode can beaccomplished by using multiple-point measured brightness values andmeasured focus detection values.

More specifically, instead of using the classification in FIGS. 12A-12F,automatic switching of the AF mode may be effected as shown in the flowchart in FIG. 18. If the background brightness change amount BB islarger than a prescribed value bb₁ as a reference value fordetermination of background brightness change, it is determined thatthere is a significant background brightness change. Similarly, if thecentral brightness change amount CB is larger than a prescribed valueCB1 as a reference value for determination of central brightness change,it is determined that the central brightness change occurs to asignificant degree.

Prescribed values A₁ to A₄ for determining a minus large value, a minussmall value, a plus small value, and a plus large value as to the objectspeed on the film surface have the relations of A₁ >A₂ >O>A₃ >A₄. If theobject speed SP on the film surface has the relation of SP>A₁, it isdetermined that the object speed is a plus great value.

In the above-described embodiment, automatic switching of the AF mode isaccomplished by the fuzzy inference using various information includingmultiple-point measured brightness values. However, it is also possibleto accomplish automatic switching of the AF mode simply by onlymultiple-point measured brightness values as shown in FIG. 19.

Referring to FIG. 19, in the situation No. 1, there are great brightnesschanges in both the background and the central region and it isconsidered that the photographer changed the framing by moving thecamera intentionally. For example, as shown in FIG. 20, it is consideredthat after the main object is set at the center, the framing is changedso that the background may be positioned at the center. In such a case,there is a strong possibility that the main object is outside the focusdetection areas but it is necessary to fix a focus position in the AFmode of the camera, that is, focus lock should be selected.

In the situations No.2 and No.4, the central brightness change occurs toa small degree and therefore the main object is considered to be in thecentral region (in the focus detection area) and it is desirable tocontinue the continuous operation.

In the situation No. 3, there is a great brightness change in thecentral region and there is a small brightness change in the background.Therefore, it is considered that the main object is out of the centralregion (the focus detection area) for some cause without moving thecamera intentionally. Consequently, it is desirable to continue thecontinuous operation. This is because once focus lock is set, the AFfunction could not be performed. The continuous mode includes a movingobject prediction correcting continuous mode. However, since switchingbetween the normal continuous mode and the moving object predictioncorrecting continuous mode does not have a direct relation with thepresent invention, the description thereof is not made.

In addition, in the above-described embodiment, an output of thecamera-shake detecting means is used for calculation of the movingobject determination reliability value. However, as shown in FIG. 21, itis possible to control the operation mode to set focus lock in a simplemanner when the output of the camera-shake detecting means is a largevalue.

In this description, the value S is a prescribed value showing apermissible camera-shake value. More specifically, if came-shake occursto a large degree, a correct measured focus detection value enablingcontinuous operation could hardly be obtained and lens drive operationwould be unstable. Such conditions would cause a disagreeable feeling inuse of the camera and therefore it is desirable to set focus lock toavoid such conditions.

As described in the foregoing, according to the present invention, asuitable operation mode is selected based on came-shake information.Thus, it is possible to determine whether a change in framing orcamera-shake occurs after AF operation and to avoid errors in measuredfocus detection values or the like with the maximum value ofcamera-shake.

Although the present invention has been described and illustrated indetail, it is clearly understood that the same is by way of illustrationand example only and is not to be taken by way of limitation, the spiritand scope of the present invention being limited only by the terms ofthe appended claims.

What is claimed is:
 1. A camera, comprising:automatic focusing means,operable in a plurality of focusing modes, for detecting a focuscondition and controlling the position of an objective lens to adjustthe focus condition, wherein the objective lens is driven in accordancewith the detected focus condition in each of the plurality of focusingmodes; detecting means for detecting a degree of camera-shake; comparingmeans for comparing an output of said detecting means with a prescribedreference value; and mode determining means for determining one of saidfocusing modes based on a result of the comparison performed by saidcomparing means.
 2. The camera according to claim 1, wherein saidautomatic focusing means operates differently in the respective focusingmodes.
 3. The camera according to claim 2, wherein said plurality offocusing modes includes a first mode in which a focus adjustingoperation is not carried out after an in-focus state is once realized,and a second mode in which a focus adjusting operation is repeated. 4.The camera according to claim 1, further comprising:determining meansfor determining whether or not data regarding the detected focuscondition is reliable, based on a result of the comparison performed bysaid comparing means.
 5. The camera according to claim 1, furthercomprising:first determining means for determining whether a subject tobe photographed is moving or still based on data regarding the detectedfocus condition; and second determining means for determining whether ornot a determination by said first determining means is reliable, basedon a result of the comparison performed by said comparing means.
 6. Thecamera according to claim 1, further comprising measuring means formeasuring a brightness of an object, and wherein said mode determiningmeans determines one of said focusing modes based on data of themeasured brightness in addition to the result of said comparison.
 7. Thecamera according to claim 1, further comprising calculating means forcalculating a photographing magnification, and wherein said modedetermining means determines one of said focusing modes based on data ofthe calculated magnification in addition to the result of saidcomparison.
 8. The camera according to claim 1, wherein said modedetermining means determines one of said focusing modes based on a fuzzyinference.
 9. A camera having a plurality of operation modes,comprising:automatic focusing means for detecting a focus condition andcontrolling the position of an objective lens to adjust the focuscondition; detecting means for detecting a degree of camera-shake;accumulating means for accumulating data pertaining to camera-shake assaid detecting means detects camera-shake during a photographicoperation by a photographer; comparing means for comparing the degree ofcamera-shake detected by said detecting means with the accumulated datapertaining to camera-shake at the time of photographing by thephotographer; and mode setting means for setting an operation mode basedon a result of comparison of said comparing means.
 10. The cameraaccording to claim 9, wherein said plurality of operation modes arefocusing modes and said automatic focusing means operates differentlyamong the plurality of focusing modes.
 11. The camera according to claim10, wherein said plurality of focusing modes includes a first mode inwhich a focus adjusting operation is not carried out after an in-focusstate is once realized, and a second mode in which a focus adjustingoperation is repeated.
 12. The camera according to claim 9, furthercomprising:determining means for determining whether or not dataregarding the detected focus condition is reliable, based on a result ofthe comparison performed by said comparing means.
 13. The cameraaccording to claim 9, further comprising:first determining means fordetermining whether a subject to be photographed is moving or stillbased on data regarding the detected focus condition; and seconddetermining means for determining whether or not a determination by saidfirst determining means is reliable, based on a result of the comparisonperformed by said comparing means.
 14. A camera comprising:an automaticfocusing means, operable in a plurality of focusing modes, for detectinga focus condition and controlling the position of an objective lens toadjust the focus condition, wherein the objective lens is driven inaccordance with the detected focus condition in each of the plurality offocusing modes; detecting means for detecting a degree of camera-shake;and mode determining means for determining one of said focusing modesbased on the degree of camera-shake detected by said detecting means.15. The camera according to claim 14, wherein said plurality of focusingmodes includes a first mode in which a focus adjusting operation is notcarried out after an in-focus state is once realized, and a second modein which a focus adjusting operation is repeated.
 16. The cameraaccording to claim 14, further comprising:determining means fordetermining whether or not data regarding the detected focus conditionis reliable, based on the degree of camera-shake detected by saiddetecting means.
 17. The camera according to claim 14, furthercomprising:first determining means for determining whether an object tobe photographed is moving or still based on data regarding the detectedfocus condition; and second determining means for determining whether ornot a determination by said first determining means is reliable, basedon the degree of camera-shake detected by said detecting means.
 18. Thecamera according to claim 14, further comprising measuring means formeasuring a brightness of an object, and wherein said mode determiningmeans determines one of said focusing modes based on data of themeasured brightness in addition to the degree of camera-shake.
 19. Thecamera according to claim 14, further comprising calculating means forcalculating a photographing magnification, and wherein said modedetermining means determines one of said focusing modes based on data ofthe calculated magnification in addition to the degree of camera-shake.20. The camera according to claim 14, wherein said mode determiningmeans determines one of said focusing modes based on a fuzzy inference.